<?php
/**
 * Created by PhpStorm.
 * User: Admin
 * Date: 2018/1/30
 * Time: 16:40
 */

require_once __DIR__ . '/../vendor/autoload.php';

use \LeanCloud\Client;
use \LeanCloud\Object;
// 参数依次为 AppId, AppKey, MasterKey
Client::initialize(
    'YED7z52eYkMloKJwUvibW2V4-gzGzoHsz',
    '8UGWS2By3ODIypNOf2OgMJl8',
    's4xKjMbJO844cIqW2Y9LmHxV'
);
$testObject = new Object("TestObjectq");
$testObject->set("words32", "Hello World!");
try {
    $testObject->save();
    echo "Save object success!";
} catch (Exception $ex) {
    echo "Save object fail!";
}
